

            


            
using System;
using System.Collections.Generic;
using System.Web;
namespace DatabaseComponent
{
     public partial class Area
     {

            //Write any additional methods or properties here 
            //Don't modify any genrated classes

         Area _objParent = null;

         public Area objParent
         {
             get {

                 if (_objParent == null)
                 {
                     if (ParentID == null)
                         return new Area();

                     AreaDB objAreaDB = new AreaDB(ConnectionStrings.LMS);
                     
                     List<Area> lstArea = objAreaDB.getAreaByID(ParentID.Value);
                     if (lstArea.Count == 0)
                         return new Area();

                     _objParent = lstArea[0];
                 }
                                 
                 
                 return _objParent; }
            
         }
     }
}
